﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="AddContact.ascx.cs" Inherits="WebForm_ManageContact_AddContact" %>

<table>
    <tr>
        <td align="right" style="height: 21px">
            <asp:Label ID="lblType" runat="server" meta:resourcekey="lblType"></asp:Label></td>
        <td align="left" style="height: 21px; width: 465px;">
            <asp:DropDownList ID="ddlType" runat="server" OnSelectedIndexChanged="ddlType_SelectedIndexChanged" AutoPostBack="True">
            </asp:DropDownList></td>
    </tr>
    <tr>
        <td align="right">
            &nbsp;<asp:Label ID="lblPath" runat="server" meta:resourcekey="lblPath"></asp:Label></td>
        <td align="left" style="width: 465px">
            <asp:FileUpload ID="FileUpload1" runat="server" Width="461px" /></td>
    </tr>
    <tr>
        <td align="right">
            &nbsp;</td>
        <td align="left" style="width: 465px">
            <asp:Button ID="btnUpload" runat="server" meta:resourcekey="btnUpload" OnClick="btnUpload_Click" ValidationGroup="vUpload" />
            <asp:RequiredFieldValidator ID="rfvFileUpload" runat="server" ControlToValidate="FileUpload1"
                Display="None" meta:resourcekey="rfvFileUpload" ValidationGroup="vUpload"></asp:RequiredFieldValidator></td>
    </tr>
    <tr>
        <td align="right">
           </td>
        <td align="left" style="width: 465px">
            <asp:GridView ID="gv" runat="server" AutoGenerateColumns="False" OnRowCommand="gv_RowCommand">
                <Columns>
                    <asp:TemplateField>
                        <ItemTemplate>
                            <asp:Label ID="lblDescription" runat="server" Text='<%# Eval("FileName") %>'></asp:Label><br />
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField>
                        <ItemTemplate>
                            <asp:LinkButton ID="lbtnDownload" runat="server" CommandArgument='<%# Eval("FilePath") %>'>下載</asp:LinkButton>
                            <%--<a id="aDownload" runat="server" href='<%# Eval("FilePath") %>' target='>下載</a>--%>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
            </asp:GridView>
            <asp:ValidationSummary ID="ValidationSummary1" runat="server" ShowMessageBox="True"
                ShowSummary="False" ValidationGroup="vUpload" />
           </td>
    </tr>
</table>
